package com.yh.homestay.common;

/**
 * @ClassName HomeStayResultG
 * @Description TODO
 * @Author GCL
 * @Date 2020/1/13 8:55
 */
public class HomeStayResult {
    private Integer code;
    private String message;
    private Integer count;
    private Object data;

    public HomeStayResult(){

    }
    public HomeStayResult(Integer code){
        this.code = code;
    }

    public HomeStayResult(Integer code, Object data){
        this.code = code;
        this.data = data;
    }

    public HomeStayResult(Integer code, String message){
        this.code = code;
        this.message = message;
    }

    public HomeStayResult(Integer code, String message, Integer count, Object data){
        this.code = code;
        this.message = message;
        this.count=count;
        this.data=data;
    }

    public static HomeStayResult ok(){
        return new HomeStayResult(200);
    }

    public static HomeStayResult build(Integer code, String message){
        return new HomeStayResult(code,message);
    }

    public static HomeStayResult ok(Integer code, Object data){
        return new HomeStayResult(code,data);
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
